-
Notifications
You must be signed in to change notification settings - Fork 105
move backend stores into their own package #851
Conversation
cmd/mt-store-cat/full.go
Outdated
now := uint32(time.Now().Unix()) | ||
end_month := now - (now % mdata.Month_sec) | ||
end_month := now - (now % cassandra.Month_sec) | ||
|
||
for _, tbl := range tables { | ||
// actual TTL may be up to 2x what's in tablename. see mdata/store_cassandra.go for details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think that filename in the comment needs updating now
It's safe for concurrent use by multiple goroutines and a typical usage scenario is to have one global session | ||
object to interact with the whole Cassandra cluster. | ||
*/ | ||
type ChunkReadRequest struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the definition of ChunkReadRequest
moved here, but ChunkWriteRequest
remains where it was?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chunkWriteRequest
s are used in the store
interfaces Add
method so all backend stores use them. The chunkReadRequest
is a Cassandra specific implimentation detail
As backend stores are pluggable, they should be in their own package. Otherwise, their global variables get initilized when mdata is loaded.
268db5d
to
96ebc7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
what's the reason for adding the drop functionality to the mock store while also keeping devnullstore? |
Due to circular dependencies, tests in mdata/ cant use devnullstore Devnullstore should be kept as there are users who want to use it (only in-memory data with no backendStore). We just need config support to be able to allow them to use it. |
As backend stores are pluggable, they should be in their own package.
Otherwise, their global variables get initilized when mdata is loaded.